Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 2, 2026

The smoke test CI lacked end-to-end coverage of Durable Functions source generator outputs, leaving activity/entity/event/sub-orchestration paths unvalidated.

  • Source generator scenario app: Added SourceGeneratorScenarios.cs with a generated orchestration, activity, entity, durable event, and child orchestration to exercise all generator outputs.
  • Namespace alignment: Overrode the smoke test project namespace/assembly to AzureFunctionsSmokeTests so generated types resolve correctly.
  • Smoke runner enhancements: Extended run-smoketests.ps1 to trigger and validate the new generated orchestration outputs alongside the existing HelloCities flow, including null-safe validation and awaited entity updates for deterministic results.
  • Docs: Updated README structure and flow description to include the generator scenario.

Summary

What changed?

  • Added source-generator-based orchestration/activity/entity/event coverage and validation.
  • Updated project namespace settings for generated types.
  • Enhanced smoke test runner validations to be null-safe and to await entity operations for reliable state checks.
  • Documented the new scenario.

Why is this change needed?

  • Ensure end-to-end CI coverage for Durable Task source generator functionality in Azure Functions.

Issues / work items

  • Resolves #
  • Related #

Project checklist

  • Release notes are not required for the next release
    • Otherwise: Notes added to release_notes.md
  • Backport is not required
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • All required tests have been added/updated (unit tests, E2E tests)
  • Breaking change?
    • If yes:
      • Impact:
      • Migration guidance:

AI-assisted code disclosure (required)

Was an AI tool used? (select one)

  • No
  • Yes, AI helped write parts of this PR (e.g., GitHub Copilot)
  • Yes, an AI agent generated most of this PR

If AI was used:

  • Tool(s): GitHub Copilot Coding Agent
  • AI-assisted areas/files: AzureFunctionsSmokeTests orchestration/activity/entity/event code, smoke runner script, PR description
  • What you changed after AI output: Adjusted validation logic to be null-safe; switched entity increment to CallEntityAsync; finalized PR metadata

AI verification (required if AI was used):

  • I understand the code and can explain it
  • I verified referenced APIs/types exist and are correct
  • I reviewed edge cases/failure paths (timeouts, retries, cancellation, exceptions)
  • I reviewed concurrency/async behavior
  • I checked for unintended breaking or behavior changes

Testing

Automated tests

  • Result: dotnet build test/AzureFunctionsSmokeTests/AzureFunctionsSmokeTests.csproj

Manual validation (only if runtime/behavior changed)

  • Environment (OS, .NET version, components): Ubuntu-latest, .NET 8, Docker
  • Steps + observed results:
    1. (Not rerun after latest change) Prior docker smoke run: HelloCities and generated orchestration completed successfully
  • Evidence (optional): N/A

Notes for reviewers

  • N/A
Original prompt

update smoke test ci to expand to test all source generator functionalities for durable function case work as expected comprehensively


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update smoke test CI for all source generator functionalities Expand Azure Functions smoke tests to cover source generator scenarios Jan 2, 2026
Copilot AI requested a review from YunchuWang January 2, 2026 23:05
@YunchuWang YunchuWang marked this pull request as ready for review January 2, 2026 23:27
Copilot AI review requested due to automatic review settings January 2, 2026 23:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the Azure Functions smoke tests to provide comprehensive end-to-end validation of the Durable Task source generator functionality. Previously, the smoke tests only validated basic orchestration scenarios without exercising the source generator's outputs for activities, entities, events, and sub-orchestrations.

Key changes:

  • Added comprehensive source generator scenario testing with class-based orchestrators, activities, entities, and durable events
  • Extended PowerShell test runner to validate all generated extension methods and their interactions
  • Configured project namespace properties to ensure generated types resolve correctly

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
test/AzureFunctionsSmokeTests/SourceGeneratorScenarios.cs New file containing GeneratedOrchestration that exercises all source generator outputs: class-based activities (ComposeGreeting, CountCharactersActivity), entity operations (GeneratorCounter), durable events (GeneratorSignal), and child orchestrations
test/AzureFunctionsSmokeTests/run-smoketests.ps1 Extended with Steps 9-10 to trigger and validate the source generator orchestration, including assertions for greeting text, entity counter values, child orchestration responses, and event message handling
test/AzureFunctionsSmokeTests/AzureFunctionsSmokeTests.csproj Added TopLevelNamespace, RootNamespace, and AssemblyName properties to align namespace resolution for source-generated extension methods
test/AzureFunctionsSmokeTests/README.md Updated structure section and test flow description to document the new source generator scenario coverage

throw "Unexpected greeting from generated activity: $greeting"
}

if (-not $greetingLength) {
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The validation logic checks if greetingLength is falsy before throwing an error. However, zero (0) is a valid length value but evaluates to false in PowerShell. If the greeting were an empty string, the length would be 0, which would incorrectly trigger the error "Greeting length was not populated correctly: 0". Consider checking for null or using -eq $null instead of -not to avoid false positives with zero values.

Suggested change
if (-not $greetingLength) {
if ($null -eq $greetingLength) {

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the validation to use null checks so zero-length values are treated correctly. Fix is in commit 8afdd80.

@YunchuWang
Copy link
Member

@copilot update pr description to follow .github/PULL_REQUEST_TEMPLATE.md

Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

@copilot update pr description to follow .github/PULL_REQUEST_TEMPLATE.md

PR description has been refreshed to follow .github/PULL_REQUEST_TEMPLATE.md (see latest PR description update in commit 8afdd80).

@YunchuWang
Copy link
Member

YunchuWang commented Jan 3, 2026

test/AzureFunctionsSmokeTests/SourceGeneratorScenarios.cs

EntityInstanceId counterId = new EntityInstanceId(nameof(GeneratorCounter), context.InstanceId);
await context.Entities.SignalEntityAsync(counterId, "Add", length);

@copilot why here use signalentity not callentity?

@YunchuWang
Copy link
Member

test/AzureFunctionsSmokeTests/SourceGeneratorScenarios.cs

EntityInstanceId counterId = new EntityInstanceId(nameof(GeneratorCounter), context.InstanceId); await context.Entities.SignalEntityAsync(counterId, "Add", length);

@copilot why here use signalentity not callentity?

@copilot

Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

[test/AzureFunctionsSmokeTests/SourceGeneratorScenarios.cs](https://github.com/microsoft/durabletask-dotnet/pull/604/files/a348938284114777ae6bc2102d7bbb9f1736f9a4#diff-83a4409d1c4879a05c11e8765c86929...

Switched to CallEntityAsync so the add operation completes before reading the counter; change is in commit 410895f.

Copy link
Contributor Author

Copilot AI commented Jan 3, 2026

[test/AzureFunctionsSmokeTests/SourceGeneratorScenarios.cs](https://github.com/microsoft/durabletask-dotnet/pull/604/files/a348938284114777ae6bc2102d7bbb9f1736f9a4#diff-83a4409d1c4879a05c11e8765c869...

Switched to CallEntityAsync so the add operation completes before reading the counter; change is in commit 410895f.

@YunchuWang YunchuWang merged commit 546bac4 into main Jan 4, 2026
8 checks passed
@YunchuWang YunchuWang deleted the copilot/update-smoke-test-ci branch January 4, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants